<?php
global $wpdb;
$table_name = $wpdb->prefix . "elliot";


if($wpdb->get_var("show tables like '$table_name'") != $table_name) {
      
      $sql = "CREATE TABLE " . $table_name . " (
	  id int(11) NOT NULL AUTO_INCREMENT,
	  timeStamp datetime NOT NULL,
	  sourceUID varchar(50) NOT NULL,
	  wpVersion varchar(50) NOT NULL,
	  phpVersion varchar(50) NOT NULL,
	  allowUrlFopen bit NOT NULL,
	  pluginName varchar(50) NOT NULL,
	  pluginVersion varchar(50) NOT NULL,
	  message text NOT NULL,
	  hash varchar(50) NOT NULL,
	  UNIQUE KEY ID (ID)
	);";

      require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
      dbDelta($sql);

      add_option("Elliot_DB_Version", "1");
}
?>